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	CALL	NZ,L56F3
L5691	LD	A,(HL)
	BIT	7,A
	RES	7,A
	PUSH	AF
	CALL	NC,L56DF
	INC	HL
	POP	AF
	JR	Z,L5691
	RET 
L569F	RRA 
L56A0	RRA 
	RRA 
	AND	7
	LD	C,A
	LD	A,E
	AND	7
L56A8	LD	B,A
	INC	B
L56AA	XOR	A
	CP	C
	CALL	L5688
	DEC	C
	DJNZ	L56AA
	RET 
L56B3	RRA 
	RRA 
	RRA 
	PUSH	HL
	LD	HL,L54EE
	PUSH	AF
	LD	A,E
	CALL	L5671
	POP	AF
	AND	7
	LD	C,A
	CALL	L56A8
	POP	HL
	RET 
L56C8	RRCA 
	XOR	4
	BIT	2,A
	JR	L56D1
L56CF	BIT	5,A
L56D1	RES	5,A
	LD	(L4B8E),A
	RET	NZ
	LD	A,E
	AND	7
	LD	C,A
	LD	B,0
	ADD	HL,BC
	RET 
L56DF	CP	#4B
	JR	Z,L5733
	CP	#51
	JR	Z,L5741
	CP	#56
	JR	Z,L5702
	CP	#57
	JR	Z,L5719
	CP	#2A
	JP	Z,L5767
L56F3	PUSH	AF
	LD	A,(L48D5)
	LD	(L48D2),A
	INC	A
	LD	(L48D5),A
	POP	AF
	JP	L4FC7
L5702	CALL	L55AE
	PUSH	HL
	PUSH	AF
	LD	A,(L48D5)
	LD	(L48D2),A
	POP	AF
	CALL	L4AAAF		;BYTE
	LD	A,(L48D2)
	LD	(L48D5),A
	POP	HL
	RET 
L5719	CALL	L55AE
	PUSH	HL
	LD	L,A
	CALL	L55AE
	LD	H,A
	LD	A,(L48D5)
	LD	(L48D2),A
	CALL	L4B60		;ADR
	LD	A,(L48D2)
	LD	(L48D5),A
	POP	HL
	RET 
L5733	PUSH	HL
	PUSH	BC
	LD	HL,L5548
	LD	C,D
	LD	B,3
	CALL	L56AA
	POP	BC
	POP	HL
	RET 
L5741	CALL	L5733
	LD	A,D
	OR	A
	RET	Z
	LD	A,#2B
	CALL	L56F3
	LD	A,(L48D1)
	DEC	A
	JR	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	LD	(L4FF5),A
	LD	(L4FF5+1),A
	RET 
HELL	CALL	L4860
	LD	HL,H1
	CALL	PRIHELL
	CALL	L4F8C
	CALL	L4860
	LD	HL,H2
	CALL	PRIHELL
	CALL	L4F8C
	CALL	L4860
	JP	L4A7C
PRIHELL	LD	E,0
PRIHE2	LD	A,(HL)
	INC	HL
	BIT	7,A
	PUSH	AF
	AND	#3F
	OUT	(#F5),A
	LD	A,E
	OUT	(#F4),A
	INC	E
	POP	AF
	JR	Z,PRIHE2
	RET 
TEXT1	DEFB	"* FOXMON-2 * V1.00 BY (R)SOFT'9","6"+#80
TEXT2	DEFB	"PRESS <?> TO HEL","P"+#80
KOPTXT	DEFB	"COPY FROM READER TO PERFORATO","R"+#80
MONCTXT	DEFB	"COPY MONITOR TO PERFORATO","R"+#80
PENDTXT	DEFB	"PERFO END BLOC","K"+#80
H1	DEFB	"	    ***	HELP ***	 "
	DEFB	"A-DIS/DUMP MODE : P-PERFO BLOCK "
	DEFB	"M-NEW ADDRESS	 : E-PERFO END	 "
	DEFB	"H-HEX/DEC MODE	 : 6,5-INC ADDR. "
	DEFB	"O-POKE	BYTES	 : 7,8-DEC ADDR. "
	DEFB	"C-COPY	BLOCK	 : ?-HELP	 "
	DEFB	"I-FILL	BLOCK	 : B-BINARY BYTE "
	DEFB	"	PRESS A	KEY TO MOR","E"+#80
H2	DEFB	"C-CALCULATE	 : T-TEXT FILL	 "
	DEFB	"L-LOAD	FROM TAPE: F-FIND TEXT	 "
	DEFB	"S-SAVE	TO TAPE	 : G-FIND BYTES	 "
	DEFB	"R-READER LOAD	 : N-FIND NEXT	 "
	DEFB	"S-SET LEN BLOCK : Z-PERFO TEXT	 "
	DEFB	"K-COPY	FROM READER TO PERFORATOR"
	DEFB	"*-COPY	MONITOR	TO PERFORATOR	 "
	DEFB	"      PRESS A KEY TO EXI","T"+#80
L48D0	DEFB	0
L48D1	DEFB	4
L48D2	DEFW	0
L48D4	DEFB	7
L48D5	DEFW	#15
L4B89	DEFW	0	;STACK
L4B8B	DEFW	0
L4B8D	DEFB	5
L4B8E	DEFB	7
L4B8F	DEFB	1
SAVTXT	DEFB	"SAVE",#80+" "
LOATXT	DEFB	"LOAD",#80+" "
FILTXT	DEFB	"FILL",#80+" "
POKTXT	DEFB	"POKE",#80+":"
L4B90	DEFB	"ADDRES",#80+"="
L4B96	DEFB	" TYPE",#80+"="
L4B9B	DEFB	"ERROR",#80+":"
L4BA3	DEFB	" LEN",#80+"="
L4BA8	DEFB	"START",#80+"="
L4BAE	DEFB	" END",#80+"="
L4BB4	DEFB	" TO",#80+"="
L4BB8	DEFB	"JUMP ADR",#80+"="
L4BBB	DEFB	"FIND TEXT",#80+":"
L4BBD	DEFB	"CALCULATE",#80+":"
L4BBF	DEFB	"TEXT FILL",#80+":"
L4BC1	DEFB	"FIND",#80+":"
L4BC3	DEFB	"BINARY",#80+":"
PERFTXT	DEFB	"PERFO",#80+":"
REATXT	DEFB	"READER",#80+":"
HARDTXT	DEFB	"HARDWARE NOT READY",#80+"!"
L4BD6	DEFB	"1=ADD:2=SUB:3=RL:4=RR:5=XOR:6=",#80+"N"
L4BF6	DEFB	#CD  ;return in	FOXMON
	DEFW	TURN
LENBL	DEFB	64
FLAG	DEFB	0
L4BF9	DEFS	7
L4DBD	DEFB	0
EOF


